<template>
	<view>
		<view class="head-cons" :style="'height:'+headHeight+'rpx;'">
			<view class="head-boxs">
				<image :src="common.appUrl.oss+common.imgList.sc11" mode="widthFix" @click="goBack"></image>
				<view>{{detail.shopname}}</view>
			</view>
		</view>
		<view class="box">
			<image :src="detail.shop_image[0]" mode="aspectFill" class="head-img">
			</image>
			<view class="shop-box">
				<view class="shop-detail">
					<view class="shop-con">
						<view class="shop-name">{{detail.shopname}}</view>
						<view class="shop-list">
							<view class="shop-more">
								<view class="s-title">评分</view>
								<view class="s-num">{{detail.score}}</view>
							</view>
							<view class="line"></view>
							<view class="shop-more">
								<view class="s-title">销量</view>
								<view class="s-num">{{detail.monthly_sales_order}}</view>
							</view>
							<view class="line"></view>
							<view class="shop-more">
								<view class="s-title">距离</view>
								<view class="s-num">{{detail.distance}}km</view>
							</view>
						</view>
					</view>
					<image :src="detail.avatar" mode="aspectFillm"></image>
				</view>
				<view class="describe">{{detail.notice||''}}</view>
			</view>
			<view class="tab">
				<view :class="state==1?'select-tab-name':'tab-name'" @click="tab(1)">点餐</view>
				<view :class="state==2?'select-tab-name':'tab-name'" @click="tab(2)">评价</view>
				<view :class="state==3?'select-tab-name':'tab-name'" @click="tab(3)">商家</view>
			</view>
			<block v-if="state==1">
				<view class="mores">
					<view class="l-con">
						<scroll-view scroll-y="true">
							<view :class="typeId==item.id?'select-c-name':'c-name'"
								v-for="(item,index) in detail.category" @click="choose(item.id)">{{item.name}}
							</view>
						</scroll-view>
					</view>
					<view class="r-con">
						<scroll-view scroll-y="true">
							<view class="dish-list">
								<!-- <view class="dish-title">{{item.cateinfo.name}}</view> -->
								<view class="dish-detail" v-for="(goods,num) in list" @click="shopdetail(goods.id)">
									<image :src="goods.image" mode="aspectFill" class="dish-img"></image>
									<view class="dish-con">
										<view class="dish-more">
											<view class="dish-name">{{goods.title}}</view>
											<view class="dish-num">月售 {{goods.sales}} 好评率 {{goods.praise_rate}}%</view>
										</view>
										<view class="dish-foot">
											<view class="dish-price"><text>￥</text>{{goods.price}}</view>
											<view class="dish-edit">
												<block v-if="goods.cart_num>0">
													<image src="/static/images/jian.png" mode="widthFix"
														@click.stop="prompt"></image>
													<view>{{goods.cart_num}}</view>
												</block>
												<image src="/static/images/jia.png" mode="widthFix"
													@click.stop="showSelect(goods)">
												</image>
											</view>
										</view>
									</view>
								</view>
							</view>
						</scroll-view>
					</view>
				</view>
				<view class="foot-box">
					<view class="foot-detail">
						<view class="foot-cart" @click="showCart">
							<image src="/static/images/cart.png" mode="widthFix"></image>
							<view>{{cart.total_num||0}}</view>
						</view>
						<view class="foot-yc">
							<view class="foot-money">￥{{cart.total_price||'0.00'}}</view>
							<view class="foot-price">另需配送费约￥{{cart.peisong||'0.00'}}</view>
						</view>
					</view>
					<view class="pay" @click="settlement">去结算</view>
				</view>
			</block>
			<block v-if="state==2">
				<view class="e-head">
					<view class="e-lcon">
						<view class="e-num">{{comment.score}}</view>
						<view class="e-img">
							<image
								:src="comment.score >= 1 ?common.appUrl.oss+common.imgList.sc5:common.appUrl.oss+common.imgList.sc6"
								mode="widthFix"></image>
							<image
								:src="comment.score >= 2 ?common.appUrl.oss+common.imgList.sc5:common.appUrl.oss+common.imgList.sc6"
								mode="widthFix"></image>
							<image
								:src="comment.score >= 3 ?common.appUrl.oss+common.imgList.sc5:common.appUrl.oss+common.imgList.sc6"
								mode="widthFix"></image>
							<image
								:src="comment.score >= 4 ?common.appUrl.oss+common.imgList.sc5:common.appUrl.oss+common.imgList.sc6"
								mode="widthFix"></image>
							<image
								:src="comment.score >= 5 ?common.appUrl.oss+common.imgList.sc5:common.appUrl.oss+common.imgList.sc6"
								mode="widthFix"></image>
						</view>
					</view>
					<view class="shop-list">
						<view class="shop-more">
							<view class="s-title">味道</view>
							<view class="s-num">{{comment.score_describe}}</view>
						</view>
						<view class="line"></view>
						<view class="shop-more">
							<view class="s-title">包装</view>
							<view class="s-num">{{comment.score_deliver}}</view>
						</view>
						<view class="line"></view>
						<view class="shop-more">
							<view class="s-title">配送满意度</view>
							<view class="s-num">{{comment.score_logistics}}</view>
						</view>
					</view>
				</view>
				<view class="null-con"></view>
				<view class="comment">
					<scroll-view scroll-y="true">
						<view class="c-head">
							<view :class="cnum==0?'select-c-h-name':'c-h-name'" @click="snum(0)">全部
								<text>{{comment.comment.all}}</text>
							</view>
							<view :class="cnum=='figure'?'select-c-h-name':'c-h-name'" @click="snum('figure')">有图
								<text>{{comment.comment.figure}}</text>
							</view>
							<view :class="cnum=='poor'?'select-c-h-name':'c-h-name'" @click="snum('poor')">近期差评
								<text>{{comment.comment.poor}}</text>
							</view>
						</view>
						<view class="c-tab">
							<view :class="names==item.name?'select-c-t-name':'c-t-name'" @click="jnum(item.name)"
								v-for="(item,index) in comment.comment.tag">{{item.name}} {{item.num}}</view>
						</view>
						<view class="more-list" v-for="(item,index) in commentList">
							<view class="more-user">
								<image :src="item.user.avatar" mode="aspectFill" class="user-img">
								</image>
								<view class="user-detail">
									<view class="user-infor">
										<view>{{item.user.nickname}}</view>
										<image :src="common.appUrl.oss+common.imgList.sc4" mode="widthFix"
											v-if="item.user.is_vip==1"></image>
									</view>
									<view class="time">{{item.createtime}}</view>
								</view>
							</view>
							<view class="dudu">
								<view>满意度</view>
								<image
									:src="item.score >= 1 ?common.appUrl.oss+common.imgList.sc5:common.appUrl.oss+common.imgList.sc6"
									mode="widthFix"></image>
								<image
									:src="item.score >= 2 ?common.appUrl.oss+common.imgList.sc5:common.appUrl.oss+common.imgList.sc6"
									mode="widthFix"></image>
								<image
									:src="item.score >= 3 ?common.appUrl.oss+common.imgList.sc5:common.appUrl.oss+common.imgList.sc6"
									mode="widthFix"></image>
								<image
									:src="item.score >= 4 ?common.appUrl.oss+common.imgList.sc5:common.appUrl.oss+common.imgList.sc6"
									mode="widthFix"></image>
								<image
									:src="item.score >= 5 ?common.appUrl.oss+common.imgList.sc5:common.appUrl.oss+common.imgList.sc6"
									mode="widthFix"></image>
								<view>味道{{item.score_describe}}星 包装{{item.score_deliver}}星
									骑士{{item.score_logistics}}星</view>
							</view>
							<view class="conswor">{{item.content}}</view>
							<view class="sp-imgs" v-if="item.images.length>0">
								<image :src="img" mode="aspectFill" v-for="(img,num) in item.images" @click="lookImage(index,num,img)">
								</image>
							</view>
							<view class="shop-hf" v-if="item.reply">
								<view class="s-title">商家回复</view>
								<view class="s-words">{{item.reply}}</view>
							</view>
							<view class="tj-box">
								<view class="tj-title">TA的推荐：</view>
								<view class="tj-shop" @click="shopdetail(item.goods_id)">
									<view>{{item.goods_name}}</view>
									<image :src="common.appUrl.oss+common.imgList.sc8" mode="widthFix"></image>
								</view>
							</view>
						</view>
					</scroll-view>
				</view>
			</block>
			<block v-if="state==3">
				<view class="t-detail">
					<view class="t-title">{{detail.shopname}}</view>
					<view class="t-cons">
						<view class="t-lcon">
							<view class="t-address">{{detail.address}}</view>
							<view class="t-time">{{detail.store_date||''}}
								{{detail.start_time||''}}-{{detail.end_time||''}}</view>
						</view>
						<view class="t-rcon">
							<view class="t-cz" @click="address">
								<image :src="common.appUrl.oss+common.imgList.sc1" mode="widthFix"></image>
								<view>导航</view>
							</view>
							<view class="t-line"></view>
							<view class="t-cz" @click="call(detail.mobile)">
								<image :src="common.appUrl.oss+common.imgList.sc2" mode="widthFix"></image>
								<view>电话</view>
							</view>
						</view>
					</view>
				</view>
				<view class="t-detail">
					<view class="t-is" style="margin-bottom: 10rpx;">商家承诺</view>
					<view class="t-list">
						<view class="t-name">营业执照</view>
						<view class="t-next" @click="lookA">
							<view>点击查看</view>
							<image :src="common.appUrl.oss+common.imgList.sc3" mode="widthFix"></image>
						</view>
					</view>
					<view class="t-list">
						<view class="t-name">健康信息</view>
						<view class="t-next" @click="lookB">
							<view>点击查看</view>
							<image :src="common.appUrl.oss+common.imgList.sc3" mode="widthFix"></image>
						</view>
					</view>
					<view class="t-list">
						<view class="t-name">店面环境</view>
						<view class="t-next" @click="lookC">
							<view>点击查看</view>
							<image :src="common.appUrl.oss+common.imgList.sc3" mode="widthFix"></image>
						</view>
					</view>
				</view>
				<view class="t-detail">
					<view class="t-is">公告</view>
					<view class="t-bc">{{detail.notice||''}}</view>
				</view>
			</block>
		</view>
		<view class="black" v-if="show" @click="hideCart">
			<view class="white" @click.stop="">
				<view class="white-heads">
					<view class="w-lcon">
						<view class="w-title">已选商品</view>
						<view class="w-price">打包费<text>￥{{cart.dabao}}</text></view>
					</view>
					<view class="w-rcon" @click.stop="delCart">
						<image :src="common.appUrl.oss+common.imgList.sc9" mode="widthFix"></image>
						<view>清空</view>
					</view>
				</view>
				<scroll-view scroll-y="true" class="goods-con">
					<view class="dish-detail" v-for="(item,index) in cart.list">
						<image :src="item.image" mode="aspectFill" class="dish-img"></image>
						<view class="dish-con">
							<view class="dish-more">
								<view class="dish-name">{{item.name}}</view>
								<view class="dish-num">{{item.difference}}</view>
							</view>
							<view class="dish-foot">
								<view class="dish-price"><text>￥</text>{{item.price}}</view>
								<view class="dish-edit">
									<image src="/static/images/jian.png" mode="widthFix"
										@click.stop="subtraction(item,index)"></image>
									<view>{{item.number}}</view>
									<image src="/static/images/jia.png" mode="widthFix"
										@click.stop="addition(item,index)">
									</image>
								</view>
							</view>
						</view>
					</view>
				</scroll-view>
				<view class="foot-box">
					<view class="foot-detail">
						<view class="foot-cart" @click="showCart">
							<image src="/static/images/cart.png" mode="widthFix"></image>
							<view>{{cart.total_num}}</view>
						</view>
						<view class="foot-yc">
							<view class="foot-money">￥{{cart.total_price||'0.00'}}</view>
							<view class="foot-price">另需配送费约￥{{cart.peisong||'0.00'}}</view>
						</view>
					</view>
					<view class="pay" @click="settlement">去结算</view>
				</view>
			</view>
		</view>
		<view class="black" v-if="tp" @click="hideSelect">
			<view class="white" @click.stop="">
				<view class="w-dish-detail">
					<image :src="goods.image" mode="aspectFill" class="w-dish-img"></image>
					<view class="w-dish-con">
						<view class="w-dish-name">{{goods.title}}</view>
						<view class="w-dish-num">{{skunames}}</view>
						<view class="w-dish-price"><text>￥</text>{{goods.price}}</view>
					</view>
				</view>
				<block v-for="(item,index) in goods.spu" :key='index'>
					<view class="sku-title">{{item.name}}</view>
					<view class="sku-box">
						<view v-for="(goods,num) in item.item" :key='num'
							:class="selects[index] === num ? 'selectcolor sku-name' :'sku-name'"
							@click.stop="handleSelectSku(index,num)">{{goods}}</view>
					</view>
				</block>
				<view class="number-box">
					<view class="num-tname">数量</view>
					<view class="dish-edit">
						<image src="/static/images/jian.png" mode="widthFix" @click.stop="decrease"></image>
						<view>{{goods.number}}</view>
						<image src="/static/images/jia.png" mode="widthFix" @click.stop="increase"></image>
					</view>
				</view>
				<view class="okkk" @click.stop="see">选好了</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		mapState,
	} from 'vuex';
	export default {
		data() {
			return {
				state: 1,
				typeId: 0,
				cnum: 0,
				bnum: 0,
				show: false,
				tp: false,
				headHeight: 0,
				app: getApp().globalData,
				detail: {},
				comment: {},
				id: '',
				commentList: [],
				page: 1,
				tag: '',
				names: '',
				list: [],
				scrollTop: 0,
				goods: {},
				selects: [],
				cart: [],
				money: '0.00',
				price: '0.00',
				skunames: '',
				addressList: []
			}
		},
		computed: {
			...mapState(['user', 'statistics', 'common'])
		},
		onLoad(e) {
			this.id = e.id
			this.headHeight = (uni.getSystemInfoSync().statusBarHeight + 45) * 2
			this.app.post('/api/chef/index/store_info', {
				id: e.id,
				lat: uni.getStorageSync('latitude'),
				lng: uni.getStorageSync('longitude'),
			}).then(res => {
				console.log(res)
				this.detail = res
				this.typeId = res.category[0].id
				this.getComment()
				this.getGoods()
				this.getCartList()
			})

		},
		onShow() {
			this.app.post('/api/wanlshop/address/getaddress').then(res => {
				console.log(res.data)
				if (res.data.length == 0) {
					uni.showModal({
						title: '温馨提示',
						content: '请添加收货地址',
						success: function(res) {
							if (res.confirm) {
								console.log('用户点击确定');
								uni.navigateTo({
									url: '/pages/user/address/address'
								})
							} else if (res.cancel) {
								uni.navigateBack({
									delta: 1
								})
								console.log('用户点击取消');
							}
						}
					});
				}
			})
			
			this.getGoods()
			this.getCartList()
		},
		methods: {
			goBack() {
				uni.navigateBack({
					delta: 1
				})
			},
			delCart() {
				this.app.post('/api/chef/index/empty_cart', {
					shop_id: this.id,
				}).then(res => {
					console.log(res)
					this.show = false
					this.getGoods()
					this.getCartList()
				})
			},
			addition(item, index) {
				console.log(item)
				this.app.post('/api/chef/index/update_cart', {
					shop_id: this.id,
					goods_id: item.goods_id,
					sku_id: item.sku_id,
					number: item.number + 1
				}).then(res => {
					console.log(res)
					this.getCartList()
				})
			},
			subtraction(item, index) {
				console.log(item)
				this.app.post('/api/chef/index/update_cart', {
					shop_id: this.id,
					goods_id: item.goods_id,
					sku_id: item.sku_id,
					number: item.number - 1
				}).then(res => {
					console.log(res)
					this.getCartList()
				})
			},
			increase() {
				this.goods.number += 1; // 数量加 1
			},
			decrease() {
				if (this.goods.number > 1) {
					this.goods.number -= 1; // 数量减 1，但最小值为 1
				}
			},
			handleSelectSku(pid, id) {
				console.log(this.selects)
				this.$set(this.selects, pid, id)
				this.skunames = this.getSelectedSpecs()
			},
			see() {
				console.log(this.goods.spu.length)
				console.log(this.selects.length)
				if (this.goods.spu.length != this.selects.length) {
					uni.showToast({
						title: '请选择菜品规格',
						icon: "none"
					})
					return
				}
				var skuid = this.filterItemsByDifference(this.getSelectedSpecs())
				this.app.post('/api/chef/index/add_cart', {
					shop_id: this.id,
					goods_id: this.goods.id,
					sku_id: skuid[0],
					num: this.goods.number
				}).then(res => {
					console.log(res)
					this.tp = false
					this.getGoods()
					this.getCartList()
				})
			},
			getSelectedSpecs() {
				const selectedNames = this.selects.map((selectedIndex, groupIndex) => {
					const group = this.goods.spu[groupIndex];
					if (group && group.item && group.item[selectedIndex] !== undefined) {
						return group.item[selectedIndex];
					}
					return '';
				});

				return selectedNames.filter(name => name).join(',');
			},

			filterItemsByDifference(targetDifference) {
				const filteredItems = this.goods.sku.filter(item => item.difference === targetDifference);
				return filteredItems.map(item => item.id);
			},
			getGoods() {
				this.app.post('/api/chef/index/store_goods', {
					shop_id: this.id,
					cate_id: this.typeId,
				}).then(res => {
					console.log(res)
					this.list = res
				})
			},
			getCartList() {
				this.app.post('/api/chef/index/cart_list', {
					shop_id: this.id,
				}).then(res => {
					console.log(res)
					this.cart = res
				})
			},
			getComment() {
				this.app.post('/api/chef/index/store_comment', {
					id: this.id,
					page: this.page,
					tag: this.tag,
				}).then(res => {
					console.log(res)
					this.comment = res
					this.commentList = this.commentList.concat(res.comment.list.data)
				})
			},
			lookImage(index,num,img){
				uni.previewImage({
					current: img,
					urls: this.commentList[index].images
				})
			},
			lookA() {
				console.log(this.detail.yingye_image)
				uni.previewImage({
					current: '',
					urls: [this.detail.yingye_image]
				})
			},
			lookB() {
				console.log(this.detail.health)
				uni.previewImage({
					current: '',
					urls: [this.detail.health]
				})
			},
			lookC() {
				console.log(123)

				console.log(this.detail.shop_image)
				uni.previewImage({
					current: this.detail.shop_image[0],
					urls: this.detail.shop_image
				})
			},
			address() {
				uni.openLocation({
					latitude: Number(this.detail.lat),
					longitude: Number(this.detail.lng),
					scale: 18,
					name: this.detail.shopname,
					address: this.detail.address,
					fail: (res) => {
						console.log(res)
					}
				})
			},
			call(tel) {
				uni.makePhoneCall({
					phoneNumber: String(tel),
					fail: (res) => {
						console.log(res)
					}
				});
			},
			tab(state) {
				this.state = state
			},
			choose(id) {
				this.typeId = id
				this.list = []
				this.getGoods()
			},
			snum(num) {
				this.cnum = num
				this.tag = num
				this.page = 1
				this.commentList = []
				this.getComment()
			},
			jnum(num) {
				this.names = num
				this.tag = num
				this.page = 1
				this.commentList = []
				this.getComment()
			},
			showCart() {
				if (this.cart.length == 0) {
					return
				}
				this.show = true
			},
			hideCart() {
				this.show = false
			},
			prompt() {
				uni.showToast({
					title: '请在购物车减购',
					icon: "none"
				})
				setTimeout(() => {
					this.show = true
				}, 1500)
			},
			showSelect(item) {
				this.tp = true
				item.number = 1
				this.selects = []
				this.goods = item
			},
			hideSelect() {
				this.tp = false
			},
			shopdetail(id) {
				uni.navigateTo({
					url: '/pages/sc/shopDetail/shopDetail?gid=' + id + '&id=' + this.id
				})
			},
			settlement() {
				if (this.$store.state.user.isLogin) {
					if (this.cart.list.length == 0) {
						uni.showToast({
							title: '请选择商品',
							icon: "none"
						})
						return
					}
					uni.navigateTo({
						url: '/pages/sc/settlement/settlement?id=' + this.id
					})
				} else {
					this.$wanlshop.to('/pages/user/auth/auth');
				}
			}
		},
		onReachBottom() {
			this.page += 1;
			this.getComment();
		},
	}
</script>

<style lang="scss">
	.head-cons {
		width: 750rpx;
		position: fixed;
		z-index: 9999;

		.head-boxs {
			width: 750rpx;
			height: 100rpx;
			position: absolute;
			bottom: 0;
			display: flex;
			align-items: center;

			image {
				width: 34rpx;
				height: 34rpx;
				margin-left: 20rpx;
			}

			view {
				width: 80%;
				text-align: center;
				color: #FFFFFF;
				position: absolute;
				left: 10%;
			}
		}
	}

	.box {
		width: 100%;
		height: 100%;
		position: fixed;
		top: 0;
		left: 0;
		background-color: #FFFFFF;

		.head-img {
			width: 750rpx;
			height: 20vh;
		}

		.shop-box {
			width: 690rpx;
			background-color: #FFFFFF;
			border-radius: 20rpx;
			position: relative;
			margin-top: -80rpx;
			margin-left: 30rpx;
			padding: 30rpx 0;
			box-shadow: 0px 0px 16px 0px rgba(0, 0, 0, 0.07);

			.shop-detail {
				width: 630rpx;
				margin-left: 30rpx;
				display: flex;
				justify-content: space-between;

				.shop-con {
					width: 500rpx;

					.shop-name {
						font-size: 34rpx;
						color: #333333;
					}

					.shop-list {
						display: flex;
						margin-top: 20rpx;

						.line {
							height: 68rpx;
							border-left: 1px solid #D8D8D8;
							margin-left: 40rpx;
							margin-right: 40rpx;
						}

						.shop-more {

							.s-title {
								font-size: 24rpx;
								color: #9E9E9E;
							}

							.s-num {
								font-size: 26rpx;
								color: #333333;
								margin-top: 6rpx;
							}
						}
					}
				}

				image {
					width: 106rpx;
					height: 106rpx;
					border-radius: 16rpx;
				}
			}

			.describe {
				width: 630rpx;
				margin-left: 30rpx;
				font-size: 24rpx;
				color: #9E9E9E;
				margin-top: 20rpx;
			}
		}

		.tab {
			width: 750rpx;
			height: 126rpx;
			display: flex;
			align-items: center;

			.tab-name {
				color: #333333;
				font-size: 34rpx;
				border-bottom: 2px solid #FFFFFF;
				margin-left: 30rpx;
				margin-right: 30rpx;
				line-height: 60rpx;
			}

			.select-tab-name {
				color: #333333;
				font-size: 34rpx;
				border-bottom: 2px solid #84BD00;
				margin-left: 30rpx;
				margin-right: 30rpx;
				line-height: 60rpx;
			}
		}

		.mores {
			width: 750rpx;
			height: 50vh;
			display: flex;

			.l-con {
				width: 180rpx;

				scroll-view {
					width: 180rpx;
					height: 100%;
					background-color: #EEFCEB;

					.c-name {
						width: 180rpx;
						line-height: 102rpx;
						font-size: 30rpx;
						color: #666666;
						text-align: center;
					}

					.select-c-name {
						width: 180rpx;
						line-height: 102rpx;
						font-size: 30rpx;
						color: #333333;
						text-align: center;
						background-color: #FFFFFF;
					}
				}
			}

			.r-con {
				width: 570rpx;

				scroll-view {
					width: 570rpx;
					height: 100%;

					.dish-list {
						width: 510rpx;
						margin-left: 30rpx;

						.dish-title {
							font-size: 30rpx;
							color: #333333;
							padding-top: 30rpx;
						}

						.dish-detail {
							width: 510rpx;
							height: 182rpx;
							display: flex;
							margin-top: 30rpx;

							.dish-img {
								width: 182rpx;
								height: 182rpx;
							}

							.dish-con {
								width: 300rpx;
								display: flex;
								align-content: space-between;
								flex-wrap: wrap;
								margin-left: 28rpx;

								.dish-more {
									width: 300rpx;

									.dish-name {
										font-size: 30rpx;
										color: #333333;
									}

									.dish-num {
										font-size: 24rpx;
										color: #999999;
										margin-top: 10rpx;
									}
								}

								.dish-foot {
									width: 300rpx;
									display: flex;
									align-items: center;
									justify-content: space-between;

									.dish-price {
										font-size: 36rpx;
										color: #333333;

										text {
											font-size: 26rpx;
											color: #333333;
										}
									}

									.dish-edit {
										display: flex;
										align-items: center;

										image {
											width: 48rpx;
											height: 48rpx;
										}

										view {
											font-size: 30rpx;
											color: #333333;
											padding: 0 20rpx;
										}
									}
								}
							}
						}
					}
				}
			}
		}

		.foot-box {
			width: 750rpx;
			height: 7vh;
			background-color: #FFFFFF;
			display: flex;
			justify-content: space-between;
			align-items: center;

			.foot-detail {
				display: flex;
				align-items: center;
				margin-left: 30rpx;

				.foot-cart {
					position: relative;
					width: 76rpx;
					height: 76rpx;

					image {
						width: 76rpx;
						height: 76rpx;
					}

					view {
						position: absolute;
						width: 30rpx;
						height: 30rpx;
						background-color: #F00;
						display: flex;
						justify-content: center;
						align-items: center;
						color: #FFFFFF;
						font-size: 22rpx;
						border-radius: 50%;
						position: absolute;
						top: 0;
						right: 0;
					}
				}

				.foot-yc {
					margin-left: 40rpx;

					.foot-money {
						font-size: 36rpx;
						color: #333333;
					}

					.foot-price {
						font-size: 24rpx;
						color: #999999;
					}
				}
			}

			.pay {
				width: 268rpx;
				height: 80rpx;
				border-radius: 10rpx;
				background-color: #84BD00;
				margin-right: 30rpx;
				font-size: 30rpx;
				color: #FFFFFF;
				display: flex;
				justify-content: center;
				align-items: center;
			}
		}

		.t-detail {
			width: 690rpx;
			border-radius: 20rpx;
			margin-left: 30rpx;
			box-shadow: 0px 0px 16px 0px rgba(0, 0, 0, 0.07);
			padding: 30rpx 0;
			margin-bottom: 30rpx;

			.t-title {
				width: 630rpx;
				margin-left: 30rpx;
				font-size: 26rpx;
			}

			.t-cons {
				width: 630rpx;
				margin-left: 30rpx;
				display: flex;
				align-items: center;
				justify-content: space-between;
				margin-top: 30rpx;

				.t-lcon {
					.t-address {
						font-size: 24rpx;
						color: #999999;
					}

					.t-time {
						font-size: 24rpx;
						color: #999999;
						margin-top: 10rpx;
					}
				}

				.t-rcon {
					display: flex;
					align-items: center;

					.t-cz {
						width: 50rpx;
						display: flex;
						justify-content: center;
						flex-wrap: wrap;

						image {
							width: 50rpx;
							height: 50rpx;
						}

						view {
							width: 100%;
							text-align: center;
							font-size: 22rpx;
							color: #9E9E9E;
						}
					}

					.t-line {
						height: 68rpx;
						border-left: 1px solid #D8D8D8;
						margin-left: 20rpx;
						margin-right: 20rpx;
					}
				}
			}

			.t-is {
				width: 630rpx;
				margin-left: 30rpx;
				font-size: 26rpx;
				color: #333333;
			}

			.t-bc {
				width: 630rpx;
				margin-left: 30rpx;
				margin-top: 20rpx;
				font-size: 24rpx;
				color: #999999;
			}

			.t-list {
				width: 630rpx;
				margin-left: 30rpx;
				display: flex;
				align-items: center;
				justify-content: space-between;

				.t-name {
					font-size: 24rpx;
					color: #333333;
				}

				.t-next {
					display: flex;
					align-items: center;
					margin-top: 10rpx;

					view {
						font-size: 24rpx;
						color: #999999;
					}

					image {
						width: 20rpx;
						height: 20rpx;
					}
				}
			}
		}

		.e-head {
			width: 690rpx;
			display: flex;
			justify-content: space-between;
			align-items: center;
			margin-left: 30rpx;

			.e-lcon {
				display: flex;
				align-items: center;

				.e-num {
					font-size: 52rpx;
					color: #FF0000;
				}

				.e-img {
					display: flex;
					align-items: center;
					margin-left: 20rpx;

					image {
						width: 20rpx;
						height: 20rpx;
						margin-right: 10rpx;
					}
				}
			}

			.shop-list {
				display: flex;

				.line {
					height: 68rpx;
					border-left: 1px solid #D8D8D8;
					margin-left: 30rpx;
					margin-right: 30rpx;
				}

				.shop-more {


					.s-title {
						font-size: 24rpx;
						color: #9E9E9E;
					}

					.s-num {
						font-size: 26rpx;
						color: #333333;
						margin-top: 6rpx;
					}
				}
			}
		}

		.null-con {
			width: 750rpx;
			height: 20rpx;
			background-color: #EEFCEB;
			margin-top: 30rpx;
		}

		.comment {
			width: 750rpx;
			height: 50vh;

			scroll-view {
				width: 750rpx;
				height: 100%;

				.c-head {
					width: 690rpx;
					display: flex;
					align-items: center;
					margin-left: 30rpx;
					padding-top: 30rpx;

					.c-h-name {
						font-size: 26rpx;
						margin-right: 80rpx;
						color: #333333;

						text {
							color: #999999;
							margin-left: 10rpx;
						}
					}

					.select-c-h-name {
						font-size: 26rpx;
						margin-right: 80rpx;
						color: #84BD00;

						text {
							color: #999999;
							margin-left: 10rpx;
						}
					}
				}

				.c-tab {
					width: 690rpx;
					display: flex;
					align-items: center;
					margin-left: 30rpx;
					padding: 30rpx 0;

					.c-t-name {
						background-color: #F6F6F6;
						padding: 8rpx 20rpx;
						font-size: 26rpx;
						margin-right: 20rpx;
						border-radius: 10rpx;
					}

					.select-c-t-name {
						background: rgba(140, 47, 82, 0.1);
						padding: 8rpx 20rpx;
						font-size: 26rpx;
						margin-right: 20rpx;
						border-radius: 10rpx;
						color: #84BD00;
					}
				}

				.more-list {
					width: 690rpx;
					margin-left: 30rpx;
					border-top: 1px solid #D8D8D8;
					padding: 30rpx 0;

					.more-user {
						display: flex;
						align-items: center;

						.user-img {
							width: 62rpx;
							height: 62rpx;
						}

						.user-detail {
							margin-left: 17rpx;

							.user-infor {
								display: flex;
								align-items: center;

								view {
									font-size: 24rpx;
									color: #333333;
								}

								image {
									width: 73rpx;
									height: 30rpx;
									margin-left: 10rpx;
								}
							}

							.time {
								font-size: 22rpx;
								color: #999999;
							}
						}
					}

					.dudu {
						width: 690rpx;
						display: flex;
						align-items: center;
						margin-top: 20rpx;

						view {
							font-size: 24rpx;
							color: #9E9E9E;
						}

						image {
							width: 20rpx;
							height: 20rpx;
							margin-left: 6rpx;
							margin-right: 6rpx;
						}
					}

					.conswor {
						width: 690rpx;
						font-size: 30rpx;
						color: #333333;
						margin-top: 20rpx;
					}

					.sp-imgs {
						width: 690rpx;
						display: flex;
						flex-wrap: wrap;

						image {
							width: 220rpx;
							height: 220rpx;
							margin-top: 20rpx;
							margin-right: 20rpx;
						}
					}

					.shop-hf {
						width: 690rpx;
						padding: 30rpx;
						background-color: #F6F6F6;
						border-radius: 16rpx;
						margin-top: 20rpx;

						.s-title {
							font-size: 24rpx;
							color: #9E9E9E;
						}

						.s-words {
							font-size: 24rpx;
							color: #9E9E9E;
							margin-top: 20rpx;
						}
					}

					.tj-box {
						width: 690rpx;
						display: flex;
						align-items: center;
						margin-top: 20rpx;

						.tj-title {
							font-size: 24rpx;
							color: #333333;
						}

						.tj-shop {
							display: flex;
							align-items: center;
							background: rgba(140, 47, 82, 0.1);
							padding: 10rpx 20rpx;
							border-radius: 10rpx;

							view {
								font-size: 26rpx;
								color: #84BD00;
							}

							image {
								width: 20rpx;
								height: 20rpx;
								margin-top: 4rpx;
								margin-left: 4rpx;
							}
						}
					}
				}
			}
		}
	}

	.black {
		width: 750rpx;
		height: 100%;
		position: fixed;
		top: 0;
		z-index: 666;
		left: 0;
		background: rgba(0, 0, 0, 0.7);

		.white {
			width: 750rpx;
			position: fixed;
			bottom: 0;
			border-radius: 30px 30px 0px 0px;
			background-color: #FFFFFF;

			.w-dish-detail {
				width: 690rpx;
				margin-left: 30rpx;
				display: flex;
				align-items: center;
				padding-top: 30rpx;

				image {
					width: 150rpx;
					height: 150rpx;
				}

				.w-dish-con {
					margin-left: 28rpx;

					.w-dish-name {
						font-size: 30rpx;
						color: #333333;
					}

					.w-dish-num {
						font-size: 24rpx;
						color: #999999;
						margin-top: 10rpx;
					}

					.w-dish-price {
						font-size: 36rpx;
						color: #333333;

						text {
							font-size: 26rpx;
							color: #333333;
						}
					}
				}
			}

			.sku-title {
				width: 690rpx;
				margin-left: 30rpx;
				font-size: 30rpx;
				color: #333333;
				padding-top: 30rpx;
				padding-bottom: 10rpx;
			}

			.sku-box {
				width: 690rpx;
				margin-left: 30rpx;
				display: flex;
				flex-wrap: wrap;

				.sku-name {
					width: 216rpx;
					height: 60rpx;
					border-radius: 10rpx;
					background: #F3F3F3;
					display: flex;
					justify-content: center;
					align-items: center;
					margin-right: 20rpx;
					margin-top: 20rpx;
				}

				.selectcolor {
					border: 1px solid #84BD00;
					color: #84BD00;
					background: rgba(140, 47, 82, 0.1);
				}

				.sku-name:nth-child(3) {
					margin-right: 0;
				}

				.sku-name:nth-child(6) {
					margin-right: 0;
				}

				.sku-name:nth-child(9) {
					margin-right: 0;
				}

				.sku-name:nth-child(12) {
					margin-right: 0;
				}
			}

			.number-box {
				width: 690rpx;
				margin-left: 30rpx;
				display: flex;
				justify-content: space-between;
				align-items: center;
				margin-top: 60rpx;

				.num-tname {
					font-size: 30rpx;
					color: #333333;
				}

				.dish-edit {
					display: flex;
					align-items: center;

					image {
						width: 48rpx;
						height: 48rpx;
					}

					view {
						font-size: 30rpx;
						color: #333333;
						padding: 0 20rpx;
					}
				}
			}

			.okkk {
				width: 690rpx;
				height: 80rpx;
				border-radius: 10rpx;
				margin-top: 100rpx;
				margin-bottom: 30rpx;
				margin-left: 30rpx;
				background-color: #84BD00;
				display: flex;
				justify-content: center;
				align-items: center;
				font-size: 30rpx;
				color: #FFFFFF;
			}

			.white-heads {
				width: 690rpx;
				height: 100rpx;
				margin-left: 30rpx;
				border-bottom: 1px solid #D8D8D8;
				display: flex;
				align-items: center;
				justify-content: space-between;

				.w-lcon {
					display: flex;
					align-items: center;

					.w-title {
						font-size: 30rpx;
						color: #333333;
						margin-right: 26rpx;
					}

					.w-price {
						font-size: 26rpx;
						color: #999999;

						text {
							color: #FF0000;
						}
					}
				}

				.w-rcon {
					display: flex;
					align-items: center;

					image {
						width: 30rpx;
						height: 30rpx;
					}

					view {
						font-size: 26rpx;
						color: #999999;
						margin-left: 7rpx;
					}
				}
			}

			.goods-con {
				width: 690rpx;
				margin-left: 30rpx;
				height: 600rpx;

				.dish-detail {
					width: 690rpx;
					height: 182rpx;
					display: flex;
					margin-top: 30rpx;

					.dish-img {
						width: 182rpx;
						height: 182rpx;
					}

					.dish-con {
						width: 480rpx;
						display: flex;
						align-content: space-between;
						flex-wrap: wrap;
						margin-left: 28rpx;

						.dish-more {
							width: 480rpx;

							.dish-name {
								font-size: 30rpx;
								color: #333333;
							}

							.dish-num {
								font-size: 24rpx;
								color: #999999;
								margin-top: 10rpx;
							}
						}

						.dish-foot {
							width: 480rpx;
							display: flex;
							align-items: center;
							justify-content: space-between;

							.dish-price {
								font-size: 36rpx;
								color: #333333;

								text {
									font-size: 26rpx;
									color: #333333;
								}
							}

							.dish-edit {
								display: flex;
								align-items: center;

								image {
									width: 48rpx;
									height: 48rpx;
								}

								view {
									font-size: 30rpx;
									color: #333333;
									padding: 0 20rpx;
								}
							}
						}
					}
				}
			}

			.foot-box {
				width: 750rpx;
				height: 7vh;
				background-color: #FFFFFF;
				display: flex;
				justify-content: space-between;
				align-items: center;

				.foot-detail {
					display: flex;
					align-items: center;
					margin-left: 30rpx;

					.foot-cart {
						position: relative;
						width: 76rpx;
						height: 76rpx;

						image {
							width: 76rpx;
							height: 76rpx;
						}

						view {
							position: absolute;
							width: 30rpx;
							height: 30rpx;
							background-color: #F00;
							display: flex;
							justify-content: center;
							align-items: center;
							color: #FFFFFF;
							font-size: 22rpx;
							border-radius: 50%;
							position: absolute;
							top: 0;
							right: 0;
						}
					}

					.foot-yc {
						margin-left: 40rpx;

						.foot-money {
							font-size: 36rpx;
							color: #333333;
						}

						.foot-price {
							font-size: 24rpx;
							color: #999999;
						}
					}
				}

				.pay {
					width: 268rpx;
					height: 80rpx;
					border-radius: 10rpx;
					background-color: #84BD00;
					margin-right: 30rpx;
					font-size: 30rpx;
					color: #FFFFFF;
					display: flex;
					justify-content: center;
					align-items: center;
				}
			}
		}
	}
</style>